using System;
using System.Globalization;
using System.Windows.Data;

namespace MvvmBase.Converters
{
    public class TimeSpanToStringConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var timeSpan=(TimeSpan)value;

            return string.Format("{0}.{1}",(int)timeSpan.TotalMinutes,timeSpan.Seconds);
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            // TODO: Implement this method
            throw new NotImplementedException();
        }
    }
}